package com.gxks.lhs.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 商品表
 * </p>
 *
 * @author LuoHaisong
 * @since 2023-06-02
 */
@Getter
@Setter
@Accessors(chain = true)
@ApiModel(value = "Goods对象", description = "商品表")
public class Goods implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("商品ID，主键")
//    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    @ApiModelProperty("发布者ID，外键关联用户表")
    private String userId;

    @ApiModelProperty("发布者的名字（冗余）")
    private String userName;

    @ApiModelProperty("商品标题")
    private String title;

    @ApiModelProperty("商品描述")
    private String description;

    @ApiModelProperty("商品价格")
    private BigDecimal price;

    @ApiModelProperty("内存容量")
    private String storage;

    @ApiModelProperty("新旧程度")
    private String degree;

    @ApiModelProperty("商品图片URL")
    private String picture;

    @ApiModelProperty("商品图片列表")
    private String pictureList;

    @ApiModelProperty("商品分类ID，外键关联分类表")
    private Integer categoryId;

    @ApiModelProperty("商品状态，0表示下架，1表示上架")
    private Integer status;

    @ApiModelProperty("发布时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("最后更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableLogic(value = "0", delval = "1")
    @ApiModelProperty("删除标识，0为正常，1为已删除")
    private Integer isDeleted;

    @ApiModelProperty("备注")
    private String remarks;


}
